<div class="page-container">
  <div style="position: relative;" class="pt20">
    <div class="container" fxLayout="row" fxLayout.sm="column">
      <div fxFlex fxLayoutAlign="start center" fxLayoutGap="16px">
        <app-categroy (onChangeCat)="handleUpdated($event)" [option]="option" [onlyLeaf]="false"></app-categroy>
        <mat-input-container class="mp0">
          <input mdInput placeholder="品牌搜索" value="" [(ngModel)]="param.brandNameSearch">
          <mat-icon mdPrefix fontIcon="fa-search" style="color:rgba(0,0,0,.87);"></mat-icon>
        </mat-input-container>
        <button mat-raised-button (click)="search()">确定</button>
      </div>
    </div>
    <ngx-busy [busy]="busy"></ngx-busy>
    <div class="container mt10">
      <table class="responsive-table bordered highlight" id="brandExport">
        <thead>
          <tr>
            <th *ngFor="let column of columns;let $index = index" st-sort [st-sort]="column" [st-sort-data]="param" (sortChanged)="sortChanged($event)"  [innerHTML]="column.title"> </th>
          </tr>
        </thead>
        <tbody>
          <tr class="repeat-item" *ngFor="let brand of vm.table.brands  | paginate: { itemsPerPage: param.rows, currentPage: vm.page, totalItems: vm.table.count,id:'brands_table'};let $index = index;">
            <td>
              <span [innerHTML]="brand.brandName | highlight:param.brandNameSearch"></span>
            </td>
            <td>{{brand.categoryName | categoryName}}</td>
            <td>{{brand.shopNum | number:'1.0-0'}}</td>
            <td>{{brand.productNum | number:'1.0-0'}}</td>
            <!-- 日销量 -->
            <td [hidden]="timeType =='month'">{{brand.sellMoney | bigNum}}</td>
            <td [hidden]="timeType =='month'">{{brand.sellAmount||0 | number:'1.0-0'}}件</td>
            <td [hidden]="timeType =='month'">{{brand.price}}元</td>
            <!-- 月销 -->
            <td [hidden]="timeType !='month'">{{brand.monthSellMoney | bigNum}}</td>
            <td [hidden]="timeType !='month'">{{brand.monthSellAmount||0 | number:'1.0-0'}}件</td>
            <td [hidden]="timeType !='month'">{{brand.monthPrice}}元</td>
          </tr>
          <tr *ngIf="vm.table.brands.length==0">
            <td colspan="9" class="center-align">暂无数据</td>
          </tr>
        </tbody>
      </table>
      <pagination-controls class="center-align pt20" id="brands_table" (pageChange)="pageChanged($event)" maxSize="9" directionLinks="true" autoHide="true">
      </pagination-controls>
    </div>
  </div>
</div>

